<div ng-controller='SellerIndex' class='right-cont'>
    <div class='title'>
        <div class="title-line" ></div>
        <div class="title-word" >推广员提现申请审批</div>


    </div>

    <div class='box-cont'>

        <div class='box-tab'>
            <ul class='nav nav-tabs' style="margin-bottom: 19px">
                <li class="first active  pull-left">
                    <a data-toggle='tab' ng-click="changeIndex(2)">申请列表</a>
                </li>
                <li class="second  pull-left">
                    <a data-toggle='tab' ng-click="changeIndex(1)">已通过</a>
                </li>
                <li class="third  pull-left">
                    <a data-toggle='tab' ng-click="changeIndex(0)">未通过</a>
                </li>
                <div class='box-input-group pull-right'>
                    <div class='input-group input-group-xs pull-right radius'>
                        <span class='input-group-addon' style='border-right:none'>
                        <i class='fa fa-calculator'></i>
                    </span>
                        <input type='text' class='form-control input-w-xs date' ng-model='startDate' style="width: 150px">
                        <span class='input-group-addon' style='border-left:none;border-right:none'>至</span>
                        <input type='text' class='form-control input-w-xs date' ng-model='endDate'  style="width: 150px">
                <span class='input-group-btn'>
                    <button class='btn btn-success radius' ng-click='lists()'>搜索</button>
                </span>
                    </div>
                </div>
            </ul>
            <div class='tab-content'>
                <div class='tab-pane fade active in'>
                    <table class='table table-list wrap-checkbox'>
                        <tr>
                            <td><input type='checkbox' class='select-all'></td>
                            <td>提现ID</td>
                            <td>用户ID</td>
                            <td>申请人</td>
                            <td>真实姓名</td>
                            <td>申请时间</td>
                            <td>申请金额</td>
                            <td>可申请金额</td>
                            <td>累计提现金额</td>
                            <td ng-if='status == 2'>操作</td>
                            <td ng-if='status == 0 ||status == 1'>状态</td>
                        </tr>
                        <tr ng-repeat='apply in applys'>
                            <td><input type='checkbox' name='id[]' value='{{apply.id}}'></td>
                            <td>{{apply.id}}</td>
                            <td>{{apply.user_id}}</td>
                            <td><span style="color:#58a3e9 ">{{apply.nickname}}</span></td>
                            <td><span style="color:#58a3e9 ">{{apply.truename || '未知'}}</span></td>
                            <td>{{apply.create_time}}</td>
                            <td><span style="color:#e74939 ">{{apply.apply_amount}}</span></td>
                            <td><span style="color:#e74939 ">{{apply.wallet}}</span></td>
                            <td><span style="color:#e74939 ">{{apply.has_apply}}</span></td>
                            <td ng-if='status == 2'>
                                <button class='btn btn-info btn-xs btn-w-xs' ng-if='apply.status == 2'
                                        ng-click='first_check(apply.id)'>
                                    初审
                                </button>
                                <button class='btn btn-warning btn-xs btn-w-xs' ng-if='apply.status == 3 || apply.status == 4'
                                        ng-click='second_check(apply.id)'>
                                    复审
                                </button>
                            </td>
                            <td ng-if='status == 0 ||status == 1'>
                                <span class='text-success' ng-if='apply.status == 1 '>
                                    {{apply.status_title}}
                                </span>
                                <span class='text-primary' ng-if='apply.status == 0'>
                                    {{apply.status_title}}
                                </span>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div style="margin-top: 40px">

                <button  class='btn btn-info btn-sm btn-w-sm btn-shadow' ng-if='status == 2'
                         ng-click='first_change_status()'>初审
                </button>
                <button class='btn btn-primary btn-sm btn-w-sm btn-shadow'
                        ng-click='out_list()'>
                    导出
                </button>
            </div>
            <div class='box-page' ng-bind-html='pages'></div>
        </div>
    </div>

    <!--复审模态框-->
    <div class='modal fade modal-second'>
        <div class='modal-dialog'>
            <div class='modal-content' align='center'>
                <div class='modal-header'>
                    提现复审
                    <a class='close' data-dismiss='modal'>&times;</a>
                </div>
                <div class='modal-body'>
                    <form class="form-horizontal" id="add-message" role="form">
                        <div class='form-group'>
                            <label class='col-sm-3 control-label'>备注</label>
                            <div class='col-sm-7'>
                                <textarea type='text' rows="5" class='form-control' ng-model='content'></textarea>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class='btn btn-primary' data-dismiss='modal' ng-click='second_change_staus(0)'>未通过</button>
                    <button type="button" class='btn btn-primary' data-dismiss='modal' ng-click='second_change_staus(4)'>通过</button>
                </div>
            </div>
        </div>
    </div>
    <!--初审模态框-->
    <div class='modal fade modal-first'>
        <div class='modal-dialog'>
            <div class='modal-content' align='center'>
                <div class='modal-header'>
                    提现初审
                    <a class='close' data-dismiss='modal'>&times;</a>
                </div>

                <div class="modal-footer">
                    <button type="button" class='btn btn-primary' data-dismiss='modal' ng-click='first_change_staus(0)'>未通过</button>
                    <button type="button" class='btn btn-primary' data-dismiss='modal' ng-click='first_change_staus(3)'>通过</button>
                </div>
            </div>
        </div>
    </div>

</div>